<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="css/app.css"/>
		<script src="js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init()
		</script>
		<style type="text/css">
			.textCenter{text-align: center;margin: 0 0 10px 0;}
			.mui-content{background: #FFFFFF;}
			.mui-media img{border-radius: 50%;width: 50px;height: 50px!important;}
			.mui-table-view .mui-media-object{line-height: 50px;max-width: 50px;}
			.bgColor{background: #5763FF;margin: 42px 0 0px 0; width: 100%;height: 150px;}
			.bgColor img {width: 60px;height: 60px;margin: 30px auto 10px;display: block;border-radius: 50%;}
			.mui-bar-nav{background:#5763FF!important;}
			.mui-bar-nav a,.mui-bar-nav h1{color: #FFFFFF!important;}
			.mui-bar-nav{box-shadow: none!important;}
			.mui-table-view:before{background: none;}
			/*.mui-table-view:after{background: none;}*/
			.colorText{color: #000000;font-size: 24px;}
			.colorText span{font-size: 12px;margin: 20px 0 10px 5px;display: inline-block;}
			.colorText+p{color: #5763FF;font-size: 14px;}
			/*.mui-content{margin:0 0 10px 0;}*/
			.username:after{background-color:white;}
			.mui-table-view-cell{padding: 12px 15px;}

		</style>
	</head>

	<body>
		<div id="headerNav"></div>
		<div class="mui-content">
			<div id="" class="mui-row bgColor">
				<img src="" alt="" />
				<p style="text-align: center;color: #FFFFFF;"></p>
			</div>
		    <div class="mui-row">
	    		<ul class="mui-table-view mui-col-sm-12 mui-col-xs-12 username" style="border-right: 1px #EEEEEE solid;">
		    		<li class="mui-table-view-cell textCenter">
		    			<p class="colorText"><span></span></p>
		    			<p></p>
		    		</li>
	    		</ul>
	    		<!--<ul class="mui-table-view mui-col-sm-6 mui-col-xs-6">
		    		<li class="mui-table-view-cell textCenter">
		    			<p class="colorText">239.00<span>元</span></p>
		    			<p>可提现金额</p>
		    		</li>
	    		</ul>-->
		    </div>
	    		<ul class="mui-table-view">
	    	        <li class="mui-table-view-cell">
	    	            <a class="mui-navigate-right" href="personalData.html">修改资料</a>
	    	        </li>
	    	        <li class="mui-table-view-cell">
	    	        	<a class="mui-navigate-right" href="shipping_address.html">我的地址</a>
	    	        </li>
	    	        <li class="mui-table-view-cell">
	    	        	<a class="mui-navigate-right" href="payment.html">支付管理</a>
	    	        </li>
	    	    </ul>
	    	    <div id="" class="mui-button-row">
					<button class="mui-button" id="btn" style="border:1px solid #5763FF;color:#5763FF;font-size:14px;font-weight: bold;margin-top: 25px;">退出当前帐号</button>
				</div>

		</div>
		
		<nav class="mui-bar mui-bar-tab foot_nav">
			<!--<a class="mui-tab-item" id="indexHtml" href="index.html">
				<span class="mui-icon iconfont icon-iconfonthome0"></span>
				<span class="mui-tab-label">首页</span>
			</a>
			<a class="mui-tab-item" id="orderHtml" href="order_form.html">
				<span class="mui-icon iconfont icon-dingdan"></span>
				<span class="mui-tab-label">订单</span>
			</a>
			<a class="mui-tab-item  mui-active" id="myHtml" href="register.html">
				<span class="mui-icon iconfont icon-weibiaoti-_huabanfuben"></span>
				<span class="mui-tab-label">我的</span>
			</a>-->
		</nav>
	</body>
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	<script type="text/javascript">
		$('#headerNav').load('header.html',function(){
			$('header h1').html('我的');
		});
		mui('body').on('tap','a',function(){
		        window.top.location.href = this.href;
		    })
	var a = localStorage.state;
	var b = localStorage.data;
	if(a == 1){
		$.ajax({
			type: "post",
			url: "http://mall.itcn99.com/i/index/nav",
			dataType: "jsonp",
			async: true,
		//					jsonp: "callback",  //传递给请求处理程序或页面的，用以获得jsonp回调函数名的参数名,默认为callback
		//					jsonpCallback: "userHandler",  //自定义的jsonp回调函数名称，默认为jQuery自动生成的随机函数名，也可以写"?"，jQuery会自动为你处理数据
			data: {
		
			},
			success: function(data) {
					console.log(data);
				var nav_url = data.data[0]["nav_url"];
				var nav_url1 = data.data[1]["nav_url"];
				var nav_url2 = data.data[2]["nav_url"];
				console.log
				var title = data.data[0]["title"];
				var title1 = data.data[1]["title"];
				var title2 = data.data[2]["title"];
				$(".foot_nav").html("").append('<a class="mui-tab-item" id="indexHtml" href="'+nav_url+'.html"><span class="mui-icon iconfont icon-iconfonthome0"></span><span class="mui-tab-label">'+title+'</span></a><a class="mui-tab-item" id="orderHtml" href="'+nav_url1+'.html"><span class="mui-icon iconfont icon-dingdan"></span><span class="mui-tab-label">'+title1+'</span></a><a class="mui-tab-item mui-active" id="myHtml" href="'+nav_url2+'.html"><span class="mui-icon iconfont icon-weibiaoti-_huabanfuben"></span><span class="mui-tab-label">'+title2+'</span></a>')
			}
		})
//		我的页面接口
		$.ajax({
			type: "post",
			url: "http://mall.itcn99.com/i/index/mine",
			async: true,
			dataType: 'jsonp',
			data: {
				"uid": b,
			},
			success: function(data) {
				console.log(data)
				var money = data.data.money;
				var username = data.data.username;
				var img = data.data.headimg;
				console.log(username);
				$(".bgColor").html("").append('<img src="' + img + '" alt="" /><p style="text-align: center;color: #FFFFFF;">' + username + '</p>')
				$(".username").html("").append('<li class="mui-table-view-cell textCenter"><p class="colorText">' + money + '<span>元</span></p><p>钱包余额</p></li>')
			}
		});
		}
		else {//项目底部导航接口
		$.ajax({
			type: "post",
			url: "http://mall.itcn99.com/i/index/nav",
			dataType: "jsonp",
			async: true,
	//					jsonp: "callback",  //传递给请求处理程序或页面的，用以获得jsonp回调函数名的参数名,默认为callback
	//					jsonpCallback: "userHandler",  //自定义的jsonp回调函数名称，默认为jQuery自动生成的随机函数名，也可以写"?"，jQuery会自动为你处理数据
			data: {
			
			},
			success: function(data) {
					console.log(data);
				var nav_url = data.data[0]["nav_url"];
				var title = data.data[0]["title"];
				var title1 = data.data[1]["title"];
				var title2 = data.data[2]["title"];
				$(".foot_nav").html("").append('<a class="mui-tab-item mui-active" id="indexHtml" href="'+nav_url+'.html"><span class="mui-icon iconfont icon-iconfonthome0"></span><span class="mui-tab-label">'+title+'</span></a><a class="mui-tab-item" id="orderHtml" href="order_form.html"><span class="mui-icon iconfont icon-dingdan"></span><span class="mui-tab-label">'+title1+'</span></a><a class="mui-tab-item" id="myHtml" href="register.html"><span class="mui-icon iconfont icon-weibiaoti-_huabanfuben"></span><span class="mui-tab-label">'+title2+'</span></a>')
			}
		})
	}
	$("#btn").click(function(){
		window.localStorage.removeItem("state");
		window.localStorage.removeItem("data");
		window.location.href="register.html";
	})
	</script>
</html>